<html>

<head>
    <title>RetroGamelib Documentation</title>
    <link rel='stylesheet' href='style.css'>
</head>

<body>

    <!-- Header -->
    <h1>Retro Game Library Documentation</h1>

    <!-- Navigation -->
<div class='nav'>
    <a href='index.html'>index</a> 
    <a href='display.html'>display</a> 
    <a href='button.html'>button</a> 
    <a href='font.html'>font</a> 
    <a href='gameobject.html'>gameobject</a> 
    <a href='util.html'>util</a> 
    <a href='camera.html'>camera</a> 
    <a href='clock.html'>clock</a> 
    <a href='geometry.html'>geometry</a> 
    <a href='constants.html'>constants</a>
    <a href='dialog.html'>dialog</a>
</div>
<br/>


    <!-- Main content goes here -->
    <h2>retrogamelib.button</h2>
    The button module will check for both key and gamepad presses at the same time. It's extremely easy to use, and quite powerful.
    
    <h2>Mapping info</h2>
    <table>
        <tr>
            <th>NES/GameBoy</th>
            <th>Keyboard</th>
            <th>Gamepad</th>
        </tr>
        <tr>
            <td>A Button</td>
            <td>Z key</td>
            <td>Button 3</td>
        </tr>
        <tr>
            <td>B Button</td>
            <td>X key</td>
            <td>Button 2</td>
        </tr>
        <tr>
            <td>START Button</td>
            <td>Enter/Return</td>
            <td>Button 9</td>
        </tr>
        <tr>
            <td>SELECT Button</td>
            <td>Right Shift key</td>
            <td>Button 10</td>
        </tr>
        <tr>
            <td>Up</td>
            <td>Up arrow</td>
            <td>Up Hat</td>
        </tr>
        <tr>
            <td>Down</td>
            <td>Down arrow</td>
            <td>Down Hat</td>
        </tr>
        <tr>
            <td>Left</td>
            <td>Left arrow</td>
            <td>Left Hat</td>
        </tr>
        <tr>
            <td>Right</td>
            <td>Right arrow</td>
            <td>Right Hat</td>
        </tr>
    
    </table>
    
    <blockquote>
        <b>button.handle_input()</b><br/>
        Checks for button presses. Call this in your game loop; without it you'll have no input!
    </blockquote>
    <blockquote>
        <b>button.is_pressed(button)</b><br/>
        Checks to see if a button was just pressed. <code>button</code> should be any of the <a href='constants.html#buttons'>button constants</a>.
    </blockquote>
    <blockquote>
        <b>button.is_held(button)</b><br/>
        Checks to see if a button is being held. <code>button</code> should be any of the <a href='constants.html#buttons'>button constants</a>.
    </blockquote>
    
    <!-- Footer/Copyright Notice -->
    <br/><br/>
    <center>Copyright &copy; 2009, pymike and saluk</center>

</body>

</html>
